Package eu.europa.ec.taxud.cesop.readers
Class PspXmlReader
java.lang.Object
eu.europa.ec.taxud.cesop.readers.PspXmlReader
- All Implemented Interfaces:
IPspXmlReader,AutoCloseable,Iterator<XmlPaymentDataMsgPart>
Utils class reading a PSP XML file.
-
Constructor Summary
ConstructorsConstructorDescriptionPspXmlReader(InputStream inputStream, long estimatedSize, int maxTransactionsInPart, boolean validateXsd) Constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
PspXmlReader
public PspXmlReader(InputStream inputStream, long estimatedSize, int maxTransactionsInPart, boolean validateXsd) throws XMLStreamException Constructor.- Parameters:
inputStream- the input stream. The input stream is not closed byPspXmlReader.estimatedSize- estimated content length in bytes, negative means that estimation is not availablemaxTransactionsInPart- the max number of transactions to be included in a payment data msg partvalidateXsd- true if validation againstXsdSchemaneeded- Throws:
XMLStreamException- in case of error while processing the XML content
-
-
Method Details
-
getEstimatedContentSize
public long getEstimatedContentSize()Description copied from interface:IPspXmlReaderGets estimated content size.- Specified by:
getEstimatedContentSizein interfaceIPspXmlReader- Returns:
- returns content size in bytes if available. If not, returns -1.
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<XmlPaymentDataMsgPart>
-
next
Description copied from interface:IPspXmlReaderParse the next part of payment data. For every payee it first yields one or more parts withPaymentDataMsgPartContentType.REPORTED_TRANSACTIONStype. Then, after all payee transactions are produced, onePaymentDataMsgPartContentType.REPORTED_PAYEEpart is yielded.- Specified by:
nextin interfaceIPspXmlReader- Specified by:
nextin interfaceIterator<XmlPaymentDataMsgPart>
-
getXmlMessageSpec
Description copied from interface:IPspXmlReaderReturns parsed MessageSpec part. Available at any point of iteration.- Specified by:
getXmlMessageSpecin interfaceIPspXmlReader- Returns:
- the xml message spec
-
getXmlReportingPsp
Description copied from interface:IPspXmlReaderReturns parsed MessageSpec part. Available at any point of iteration.- Specified by:
getXmlReportingPspin interfaceIPspXmlReader- Returns:
- the xml reporting psp
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-